<template>
  <div>
      用户:<input type="text" v-model="user"><br>
      密码:<input type="text" v-model="password"><br>
      作者:<input type="radio" value="True" v-model="level">普通作者
      <input type="radio" value="False" v-model="level">VIP作者<br>
      <button @click="add">添加</button>
  </div>
</template>

<script>
export default {
    name:'author_post',
    data(){
        return{
            user:'',
            password:'',
            level:''
        }
    },
    methods:{
        add(){
            let data = new FormData();
            data.append('user',this.user)
            data.append('password',this.password)
            data.append('level',this.level)
            this.axios.post('yt2/',data).then(res=>{
                this.$router.push('author_get')
            })
        }
    }

}
</script>

<style>

</style>